Stat
Ecng.ComponentModel
Provides statistical tracking for actions.
Properties
FreqLimit
public int FreqLimit { get; set; }
value = stat.FreqLimit
stat.FreqLimit = value
Gets or sets the maximum number of frequency records to keep.
LongestLimit
public int LongestLimit { get; set; }
value = stat.LongestLimit
stat.LongestLimit = value
Gets or sets the maximum number of longest duration records to keep.
Methods
Begin
public Item<TAction> Begin(TAction action, IPAddress address)
result = stat.Begin(action, address)
Starts tracking an action.
- action
- The action to track.
- address
- The IP address associated with the action.
Returns: An Item that represents the action tracking session.
GetInfo
public StatInfo<TAction> GetInfo(int skip, int take)
result = stat.GetInfo(skip, take)
Retrieves statistical information with support for paging.
- skip
- The number of records to skip.
- take
- The number of records to take.
Returns: A StatInfo structure containing the current statistics.